
function updatePerformer(btn){
	var num = $(btn).parents("tr").children("td").length;
	var num2 = $("#update").find("input").length;
	for(var i = 0;i<num-1;i++){
		var p = $(btn).parents("tr").children("td").eq(i).html();
		$("#update").find("input").eq(i).val(p);
	}
}
 function detailPerformer(btn){
		var num = $(btn).parents("tr").children("td").length;
		for(var i = 0;i<num-1;i++){
			var p = $(btn).parents("tr").children("td").eq(i).html();
			$("#definite").find("input").eq(i).val(p);
		}
	}
function showPagePerformer(pageWho){
	var int = $(pageWho).find("a").html();
	$(pageWho).attr("class","active data");
	location.href="/film/adminPerformer.do?firstPage="+int;
}
function performerPageUp(pageNum){
	if(pageNum > 1){
		location.href="/film/adminPerformer.do?firstPage="+(pageNum-1);
	}else{
		alert("已经是第一页了！");
	}
}
function performerPageDown(pageNum,pageSize){
	if(pageNum<pageSize){
		location.href="/film/adminPerformer.do?firstPage="+(pageNum+1);
	}else{
		alert("已经是最后一页了！");
	}
	

}

//表单验证
function checkForm(){
	var perName = $("#add input[name=perName]").val();
	var perNickName = $("#add input[name=perNickName]").val();
	var perTypr = $("#add input[name=perTypr]").val();
	var filmImg = $("#add input[name=filmImg]").val();
	var perBirth = $("#add input[name=perBirth]").val();
	var perHeight = $("#add input[name=perHeight]").val();
	var perSex = $("#add input[name=perSex]").val();
	var perNationnality = $("#add input[name=perNationnality]").val();
	var perBirthPlace = $("#add input[name=perBirthPlace]").val();
	var perStar = $("#add input[name=perStar]").val();
	var perIntroduce = $("#add input[name=perIntroduce]").val();
	
	if(perName=='' || perNickName=='' || perTypr=='' || 
			filmImg=='' || perBirth=='' || perHeight=='' || 
			perSex=='' || perNationnality=='' || perBirthPlace=='' || 
			perStar=='' || perIntroduce==''){
		alert("输入的信息不能为空")
		return false;
	}else{
		return true;
	}
}